package com.share.device.constants;

/**
 * 设备管理常量
 * 
 * @author         
 * @date 2025-06-24
 */
public class DeviceConstants
{
    /** 设备类型 */
    public static class DeviceType {
        /** 柜机 */
        public static final String CABINET = "cabinet";
        /** 充电宝 */
        public static final String POWER_BANK = "power_bank";
    }

    /** 柜机状态 */
    public static class CabinetStatus {
        /** 未投入 */
        public static final String NOT_DEPLOYED = "0";
        /** 使用中 */
        public static final String IN_USE = "1";
        /** 故障 */
        public static final String FAULT = "-1";
    }

    /** 充电宝状态 */
    public static class PowerBankStatus {
        /** 未投放 */
        public static final String NOT_DEPLOYED = "0";
        /** 可用 */
        public static final String AVAILABLE = "1";
        /** 已租用 */
        public static final String RENTED = "2";
        /** 充电中 */
        public static final String CHARGING = "3";
        /** 故障 */
        public static final String FAULT = "4";
    }

    /** 插槽状态 */
    public static class SlotStatus {
        /** 空闲 */
        public static final String FREE = "0";
        /** 占用 */
        public static final String OCCUPIED = "1";
        /** 锁定 */
        public static final String LOCKED = "2";
    }

    /** 操作类型 */
    public static class OperationType {
        /** 部署 */
        public static final String DEPLOY = "deploy";
        /** 维护 */
        public static final String MAINTAIN = "maintain";
        /** 移除 */
        public static final String REMOVE = "remove";
        /** 重置 */
        public static final String RESET = "reset";
    }

    /** 日志操作类型 */
    public static class LogOperationType {
        /** 手动操作 */
        public static final String MANUAL = "manual";
        /** 自动操作 */
        public static final String AUTO = "auto";
        /** 系统操作 */
        public static final String SYSTEM = "system";
    }

    /** 默认值 */
    public static class DefaultValues {
        /** 默认位置ID */
        public static final Long DEFAULT_LOCATION_ID = 1L;
        /** 默认柜机类型ID */
        public static final Long DEFAULT_CABINET_TYPE_ID = 1L;
        /** 默认总插槽数 */
        public static final Long DEFAULT_TOTAL_SLOTS = 8L;
    }

    /** 业务规则 */
    public static class BusinessRules {
        /** 最小电量阈值 */
        public static final double MIN_ELECTRICITY_THRESHOLD = 0.2;
        /** 最大电量阈值 */
        public static final double MAX_ELECTRICITY_THRESHOLD = 1.0;
        /** 充电宝编号前缀 */
        public static final String POWER_BANK_NO_PREFIX = "PB";
        /** 柜机编号前缀 */
        public static final String CABINET_NO_PREFIX = "CAB";
    }
} 